import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/Login.vue'),
      meta: { requiresSidebar: false } // 登录页不需要侧边栏
    },

    {
      path: '/table',
      name: 'table',
      component: () => import('../views/table.vue'),
      meta: { requiresSidebar: true }
    },
    {
      path: '/personalCenter',
      name: 'personalCenter',
      component: () => import('../views/personalCenter.vue'),
      meta: { requiresSidebar: true }
    },
    {
      path: '/collagePaperRank',
      name: 'collagePaperRank',
      component: () => import('../views/collagePaperRank.vue'),
      meta: { requiresSidebar: true }
    },
    {
      path: '/ActivityAnnouncement',
      name: 'ActivityAnnouncement',
      component: () => import('../views/ActivityAnnouncement.vue'),
      meta: { requiresSidebar: true }
    },
    {
      path: '/speedOfProgress',
      name: 'SpeedOfProgress',
      component: () => import('../views/SpeedOfProgress.vue'),
      meta: { requiresSidebar: true }
    },
    {
      path: '/researchMaterials',
      name: 'ResearchMaterials',
      component: () => import('../views/ResearchMaterialsPage.vue'),
      meta: { requiresSidebar: true }
    },
    {
      path: '/VIP',
      name: 'VIP',
      component: () => import('../views/VIP.vue'),
      meta: { requiresSidebar: true }
    },
    {
      path: '/credits',
      name: 'credits',
      component: () => import('../views/credits.vue'),
      meta: { requiresSidebar: true }
    }, {
      path: '/detail',
      name: 'detail',
      component: () => import('../views/detail.vue'),
      meta: { requiresSidebar: true }
    },
  ]
})


export default router
